package com.dianning.web.action.jianzhi;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.*;

import com.dianning.bean.Area;
import com.dianning.bean.ChannelContact;
import com.dianning.bean.Company;
import com.dianning.bean.Info;
import com.dianning.bean.InfoExpand;
import com.dianning.bean.Money;
import com.dianning.bean.Parameter;
import com.dianning.bean.Profile;
import com.dianning.bean.Resume;
import com.dianning.bean.TradingArea;
import com.dianning.bean.UserDetail;
import com.dianning.bean.UserInfo;
import com.dianning.bean.Visitor;
import com.dianning.comm.ChannelConfig;
import com.dianning.comm.Constant;
import com.dianning.comm.DianningUtil;
import com.dianning.comm.OrderObj;
import com.dianning.comm.Util;
import com.dianning.exception.DianningException;
import com.dianning.service.AreaService;
import com.dianning.service.ChannelService;
import com.dianning.service.InfoService;
import com.dianning.service.ParameterService;
import com.dianning.service.UserInfoService;
import com.dianning.service.VisitorService;
import com.dianning.service.web.PageList;
import com.dianning.service.web.Pages;
import com.dianning.web.action.BaseAction;
import com.dianning.web.interceptor.RemoteAddrAware;
import com.dianning.web.interceptor.UserSessionAware;
import com.dianning.web.servlet.UserSession;
import com.dianning.web.ui.OptionsLong;

public class Yanyi extends BaseAction implements UserSessionAware{

	private static final Log logger = LogFactory.getLog(Yanyi.class);
	
	private InfoService infoService;
	private ChannelService channelService;
	private ParameterService parameterService;
	private AreaService areaService;
	private UserInfoService userInfoService;


	public InfoService getInfoService() {
		return infoService;
	}

	public void setInfoService(InfoService infoService) {
		this.infoService = infoService;
	}
	
	public ChannelService getChannelService() {
		return channelService;
	}

	public void setChannelService(ChannelService channelService) {
		this.channelService = channelService;
	}

	public ParameterService getParameterService() {
		return parameterService;
	}

	public void setParameterService(ParameterService parameterService) {
		this.parameterService = parameterService;
	}

	public AreaService getAreaService() {
		return areaService;
	}

	public void setAreaService(AreaService areaService) {
		this.areaService = areaService;
	}

	public UserInfoService getUserInfoService() {
		return userInfoService;
	}

	public void setUserInfoService(UserInfoService userInfoService) {
		this.userInfoService = userInfoService;
	}
	
	private UserSession userSession;

	public UserSession getUserSession() {
		return userSession;
	}

	public void setUserSession(UserSession userSession) {
		this.userSession = userSession;
	}
	
	private List jianzhiYanyiTypeList = new ArrayList();
	private List edugradeList = new ArrayList();
	private List workyearsList = new ArrayList();

	public List getJianzhiYanyiTypeList() {
		return jianzhiYanyiTypeList;
	}

	public void setJianzhiYanyiTypeList(List jianzhiYanyiTypeList) {
		this.jianzhiYanyiTypeList = jianzhiYanyiTypeList;
	}

	public List getEdugradeList() {
		return edugradeList;
	}

	public void setEdugradeList(List edugradeList) {
		this.edugradeList = edugradeList;
	}

	public List getWorkyearsList() {
		return workyearsList;
	}

	public void setWorkyearsList(List workyearsList) {
		this.workyearsList = workyearsList;
	}

	private void setJianzhiYanyiTypeListValues(){
		List l = this.getParameterService().findParameters("jianzhiYanyiType", 2, null, "orders", 0);
		for(int i=0;i<l.size();i++){
			Parameter p = (Parameter) l.get(i);
			jianzhiYanyiTypeList.add(new OptionsLong(p.getId(), p.getParamName()));
		}
	}
	private void setEdugradeListValues(){
		edugradeList.add(new OptionsLong(0, "不限"));
		List l = this.getParameterService().findParameters("edugrade", 2, null, "orders", 0);
		for(int i=0;i<l.size();i++){
			Parameter p = (Parameter) l.get(i);
			edugradeList.add(new OptionsLong(p.getId(), p.getParamName()));
		}
	}
	private void setWorkyearsListValues(){
		workyearsList.add(new OptionsLong(0, "不限"));
		List l = this.getParameterService().findParameters("workyears", 2, null, "orders", 0);
		for(int i=0;i<l.size();i++){
			Parameter p = (Parameter) l.get(i);
			workyearsList.add(new OptionsLong(p.getId(), p.getParamName()));
		}
	}

	
	private void initValues(){
		setJianzhiYanyiTypeListValues();
		setEdugradeListValues();
		setWorkyearsListValues();
		this.setBigChannel(this.getChannelService().findChannelContactById(this.bid));
		this.setSmallChannel(this.getChannelService().findChannelContactById(this.sid));
		this.setArea(this.getAreaService().findAreaById(this.areaId));
		if(this.areaId == -1){
			this.areaId = 0;
		}
		if(this.tid == -1){
			this.tid = 0;
		}
		this.setTradingArea(this.getAreaService().findTradingAreaById(this.tid));
	}
	
	private long id;
	private long bid = ChannelConfig.JIANZHI_ID;
	private long sid = ChannelConfig.JIANZHI_YANYI_ID;
	private long areaId = -1;
	private long allTop = 1;
	private long tid = -1;
	private String title = "";
	private int isbiz = -1;
	private boolean biz = false;
	private boolean profile = true;
	private String content;
	private List photo;
	private int photonum;
	private String linkman;
	private String phone;
	
	private String address;
	private long jianzhiYanyiType = -1;
	private long zhaopinnum = 0;
	private long edugrade = 0;
	private long workyears = 0;
	private String minPrice = "";
	private String maxPrice = "";
	private String qq;
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getBid() {
		return bid;
	}

	public void setBid(long bid) {
		this.bid = bid;
	}

	public long getSid() {
		return sid;
	}

	public void setSid(long sid) {
		this.sid = sid;
	}public long getAreaId() {
		return areaId;
	}

	public void setAreaId(long areaId) {
		this.areaId = areaId;
	}

	public long getAllTop() {
		return allTop;
	}

	public void setAllTop(long allTop) {
		this.allTop = allTop;
	}


	public long getTid() {
		return tid;
	}

	public void setTid(long tid) {
		this.tid = tid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public long getJianzhiYanyiType() {
		return jianzhiYanyiType;
	}

	public void setJianzhiYanyiType(long jianzhiYanyiType) {
		this.jianzhiYanyiType = jianzhiYanyiType;
	}

	public long getZhaopinnum() {
		return zhaopinnum;
	}

	public void setZhaopinnum(long zhaopinnum) {
		this.zhaopinnum = zhaopinnum;
	}

	public long getEdugrade() {
		return edugrade;
	}

	public void setEdugrade(long edugrade) {
		this.edugrade = edugrade;
	}

	public long getWorkyears() {
		return workyears;
	}

	public void setWorkyears(long workyears) {
		this.workyears = workyears;
	}

	public String getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(String minPrice) {
		this.minPrice = minPrice;
	}

	public String getMaxPrice() {
		return maxPrice;
	}

	public void setMaxPrice(String maxPrice) {
		this.maxPrice = maxPrice;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getLinkman() {
		return linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getIsbiz() {
		return isbiz;
	}

	public void setIsbiz(int isbiz) {
		this.isbiz = isbiz;
	}

	public boolean isBiz() {
		return biz;
	}

	public void setBiz(boolean biz) {
		this.biz = biz;
	}

	public boolean isProfile() {
		return profile;
	}

	public void setProfile(boolean profile) {
		this.profile = profile;
	}


	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public List getPhoto() {
		return photo;
	}

	public void setPhoto(List photo) {
		this.photo = photo;
	}

	public int getPhotonum() {
		return photonum;
	}

	public void setPhotonum(int photonum) {
		this.photonum = photonum;
	}
	
	private Info info;
	private List sameAreas;
	private List sameUsers;
	private PageList pageList;
	private List areas;
	private String domain = Constant.DOMAIN;
	private String profileDomain = Constant.PROFILE_DOMAIN;
	private ChannelContact bigChannel;
	private ChannelContact smallChannel;
	private Area area;
	private TradingArea tradingArea;
	private List jianzhiYanyiTypes;
	
	public Info getInfo() {
		return info;
	}

	public void setInfo(Info info) {
		this.info = info;
	}
	
	public List getSameAreas() {
		return sameAreas;
	}

	public void setSameAreas(List sameAreas) {
		this.sameAreas = sameAreas;
	}

	public List getSameUsers() {
		return sameUsers;
	}

	public void setSameUsers(List sameUsers) {
		this.sameUsers = sameUsers;
	}

	public PageList getPageList() {
		return pageList;
	}

	public void setPageList(PageList pageList) {
		this.pageList = pageList;
	}

	public List getAreas() {
		return areas;
	}

	public void setAreas(List areas) {
		this.areas = areas;
	}
	

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public String getProfileDomain() {
		return profileDomain;
	}

	public void setProfileDomain(String profileDomain) {
		this.profileDomain = profileDomain;
	}

	public ChannelContact getBigChannel() {
		return bigChannel;
	}

	public void setBigChannel(ChannelContact bigChannel) {
		this.bigChannel = bigChannel;
	}

	public ChannelContact getSmallChannel() {
		return smallChannel;
	}

	public void setSmallChannel(ChannelContact smallChannel) {
		this.smallChannel = smallChannel;
	}

	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}

	public TradingArea getTradingArea() {
		return tradingArea;
	}

	public void setTradingArea(TradingArea tradingArea) {
		this.tradingArea = tradingArea;
	}

	public List getJianzhiYanyiTypes() {
		return jianzhiYanyiTypes;
	}

	public void setJianzhiYanyiTypes(List jianzhiYanyiTypes) {
		this.jianzhiYanyiTypes = jianzhiYanyiTypes;
	}

	public String execute() {
		try {
			return this.executeMethod(this.getAction());
		} catch (Exception e) {
			logger.error(e);
			return ERROR;
		}
	}

	public String index(){
		this.setInfo(this.getInfoService().findInfoById(this.id));
		if(this.getInfo() == null){
			return "infodisable";
		}else{
			if(this.getInfo().getValidated() == 2){
				return "infodisable";
			}
		}
		this.setSameAreas(this.getInfoService().findInfos(id,-1, this.getInfo().getCcid(), 1, 1, -1, "addTime", 1, 1, 5));
		this.setSameUsers(this.getInfoService().findInfos(id,this.getInfo().getUid(), this.getInfo().getCcid(), 1, 1, -1, "addTime", 1, 1, 5));
        return "index";
	}
	
	public String list(){
		if(this.areaId == 0){
			this.areaId = -1;
		}
		if(this.tid == 0){
			this.tid = -1;
		}
		this.setAreas(this.getAreaService().findAreas("orders", 0));
		this.setJianzhiYanyiTypes(this.getParameterService().findParameters("jianzhiYanyiType", 2, null, "orders", 0));
		Pages pages = new Pages();
		pages.setPage(this.getPage());
		pages.setPerPageNum(Constant.PAGE_NUM);
		if (this.getTotal() > 0) {
			pages.setTotalNum(this.getTotal());
		}
		pages.setFileName("/jianzhi/yanyi.action?action=list&areaId="+this.areaId+"&tid="+this.tid+"&isbiz="+this.isbiz+"&jianzhiYanyiType="+this.jianzhiYanyiType+"&minPrice="+this.minPrice+"&maxPrice="+this.maxPrice+"&title="+this.title);
		List wherein = new ArrayList();
		if(StringUtils.isNotBlank(minPrice)){
			wherein.add("keyword='minPrice' and ivalue>="+(int)(Float.parseFloat(minPrice)*10));
		}
		if(StringUtils.isNotBlank(maxPrice)){
			wherein.add("keyword='minPrice' and ivalue<="+(int)(Float.parseFloat(maxPrice)*10));
		}
		if(jianzhiYanyiType != -1){
			wherein.add("keyword='jianzhiYanyiType' and ivalue=" + jianzhiYanyiType);
		}
		OrderObj commend = new OrderObj();
		commend.setOrderBy("isCommend");
		commend.setAscOrDesc(1);
		OrderObj top = new OrderObj();
		if(this.areaId == -1){
			top.setOrderBy("isCityTop");
			top.setAscOrDesc(1);
		}else{
			this.allTop = -1;
			top.setOrderBy("isAreaTop");
			top.setAscOrDesc(1);
		}
		OrderObj up = new OrderObj();
		up.setOrderBy("upTime");
		up.setAscOrDesc(1);
		OrderObj[] oo = {commend,top,up};
		this.setPageList(this.getInfoService().findInfos(-1, -1, sid, areaId, tid, isbiz, 1, 1,-1,title, wherein, oo, pages));
		return "list";
	}
	public String post(){
		initValues();
		this.setAction("dopost");
		UserInfo ui = this.getUserInfoService().findUserInfoByUid(userSession.getUid());
		this.setLinkman(ui.getName());
		this.setPhone(ui.getUserDetail().getMobile());
		return "post";
	}
	
	public String dopost(){
		ChannelContact cc = this.getChannelService().findChannelContactById(this.sid);
		Info info = new Info();
		info.setCid(cc.getChannelId());
		info.setCcid(this.sid);
		info.setTitle(this.title);
		info.setContent(this.content);
		info.setAreaId(this.areaId);
		info.setTradingareaId(this.tid);
		info.setUid(this.userSession.getUid());
		info.setName(this.linkman);
		info.setTel(this.phone);
		info.setIsbiz(this.isbiz);
		info.setPhoto(this.photo);
		if(this.photo==null || this.photo.isEmpty()){
			info.setPhotonum(0);
		}else{
			info.setPhotonum(this.photo.size());
		}
		info.setAvatar("");
		info.setValidated(0);
		info.setStatus(1);
		info.setAddTime(new Date());
		info.setUpTime(new Date());
		info.setIsCityTop(0);
		info.setCityTopTime(new Date());
		info.setIsAreaTop(0);
		info.setAreaTopTime(new Date());
		info.setIsCommend(0);
		info.setCommendTime(new Date());
		
		List infoExpands = new ArrayList();
		//address
		InfoExpand infoAddress = new InfoExpand();
		infoAddress.setKeyword("address");
		infoAddress.setSvalue(this.address);
		infoAddress.setIvalue(0);
		infoExpands.add(infoAddress);
		//jianzhiYanyiType
		Parameter pYanyiType = this.getParameterService().findParameterById(this.jianzhiYanyiType);
		InfoExpand infoYanyiType = new InfoExpand();
		infoYanyiType.setKeyword("jianzhiYanyiType");
		infoYanyiType.setSvalue(pYanyiType.getParamName());
		infoYanyiType.setIvalue(this.jianzhiYanyiType);
		infoExpands.add(infoYanyiType);
		//zhaopinnum
		InfoExpand infoZhaopinnum = new InfoExpand();
		infoZhaopinnum.setKeyword("zhaopinnum");
		if(this.zhaopinnum == 0){
			infoZhaopinnum.setSvalue("若干");
		}else{
			infoZhaopinnum.setSvalue(String.valueOf(this.zhaopinnum));
		}
		infoZhaopinnum.setIvalue(this.zhaopinnum);
		infoExpands.add(infoZhaopinnum);
		//edugrade
		InfoExpand infoEdugrade = new InfoExpand();
		infoEdugrade.setKeyword("edugrade");
		if(this.edugrade == 0){
			infoEdugrade.setSvalue("不限");
			infoEdugrade.setIvalue(0);
		}else{
			Parameter pEdugrade = this.getParameterService().findParameterById(this.edugrade);
			infoEdugrade.setSvalue(pEdugrade.getParamName());
			infoEdugrade.setIvalue(this.edugrade);
		}
		infoExpands.add(infoEdugrade);	
		//workyears
		InfoExpand infoWorkyears = new InfoExpand();
		infoWorkyears.setKeyword("workyears");
		if(this.workyears == 0){
			infoWorkyears.setSvalue("不限");
			infoWorkyears.setIvalue(0);
		}else{
			Parameter pWorkyears = this.getParameterService().findParameterById(this.workyears);
			infoWorkyears.setSvalue(pWorkyears.getParamName());
			infoWorkyears.setIvalue(this.workyears);
		}
		infoExpands.add(infoWorkyears);	
		//minPrice
		InfoExpand infoMinPrice = new InfoExpand();
		infoMinPrice.setKeyword("minPrice");
		infoMinPrice.setSvalue(this.minPrice);
		if(StringUtils.isBlank(this.minPrice)){
			infoMinPrice.setIvalue(0);
		}else{
			infoMinPrice.setIvalue((int)(Float.parseFloat(minPrice)*10));
		}
		infoExpands.add(infoMinPrice);
		//maxPrice
		InfoExpand infoMaxPrice = new InfoExpand();
		infoMaxPrice.setKeyword("maxPrice");
		infoMaxPrice.setSvalue(this.maxPrice);
		if(StringUtils.isBlank(this.maxPrice)){
			infoMaxPrice.setIvalue(0);
		}else{
			infoMaxPrice.setIvalue((int)(Float.parseFloat(maxPrice)*10));
		}
		infoExpands.add(infoMaxPrice);
		
		info = this.getInfoService().saveInfo(info, infoExpands);
		this.id = info.getId();
		return "dopost";
	}
	

	public String update(){
		
		this.setAction("doupdate");
		this.setInfo(this.getInfoService().findInfoById(this.id));
		if(this.getInfo() == null){
			return "infodisable";
		}else{
			if(this.getInfo().getValidated() == 2){
				return "infodisable";
			}
		}
		ChannelContact cc = this.getChannelService().findChannelContactById(this.sid);
		this.bid = cc.getParentId();
		this.sid = this.info.getCcid();
		this.areaId = this.info.getAreaId();
		this.tid = this.info.getTradingareaId();
		this.title = this.info.getTitle();
		this.content = this.info.getContent();
		this.linkman = this.info.getName();
		this.phone = this.info.getTel();
		this.biz = int2boolean(this.info.getIsbiz());
		this.profile = int2boolean(this.info.getIsProfile());
		this.photo = this.info.getPhoto();
		this.photonum = this.info.getPhotonum();
		
		//address
		InfoExpand infoAddress = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "address");
		this.address = infoAddress.getSvalue();

		//jianzhiYanyiType
		InfoExpand infoYanyiType = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "jianzhiYanyiType");
		this.jianzhiYanyiType = infoYanyiType.getIvalue();
		//zhaopinnum
		InfoExpand infoZhaopinnum = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "zhaopinnum");
		this.zhaopinnum = infoZhaopinnum.getIvalue();
		//edugrade
		InfoExpand infoEdugrade = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "edugrade");
		this.edugrade = infoEdugrade.getIvalue();
		//workyears
		InfoExpand infoWorkyears = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "workyears");
		this.workyears = infoWorkyears.getIvalue();
		//minPrice
		InfoExpand infoMinPrice = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "minPrice");
		if(infoMinPrice.getIvalue()!=0){
			this.minPrice = infoMinPrice.getSvalue();
		}
		//maxPrice
		InfoExpand infoMaxPrice = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "maxPrice");
		if(infoMaxPrice.getIvalue()!=0){
			this.maxPrice = infoMaxPrice.getSvalue();
		}
		
		initValues();
		return "update";
	}
	
	public String doupdate(){
		ChannelContact cc = this.getChannelService().findChannelContactById(this.sid);
		Info info = this.getInfoService().findInfoById(this.id);
		info.setCid(cc.getChannelId());
		info.setCcid(this.sid);
		info.setTitle(DianningUtil.filterKeyword(this.title));
		info.setContent(DianningUtil.filterKeyword(this.content));
		info.setAreaId(this.areaId);
		info.setTradingareaId(this.tid);
		info.setUid(this.userSession.getUid());
		info.setName(this.linkman);
		info.setTel(this.phone);
		info.setIsbiz(boolean2int(this.biz));
		info.setIsProfile(boolean2int(this.profile));
		info.setPhoto(this.photo);
		if(this.photo==null || this.photo.isEmpty()){
			info.setPhotonum(0);
		}else{
			info.setPhotonum(this.photo.size());
		}
		
		List infoExpands = new ArrayList();
		//address
		InfoExpand infoAddress = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "address");
		infoAddress.setSvalue(this.address);
		infoExpands.add(infoAddress);

		//jianzhiYanyiType
		Parameter pYanyiType = this.getParameterService().findParameterById(this.jianzhiYanyiType);
		InfoExpand infoYanyiType = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "jianzhiYanyiType");
		infoYanyiType.setKeyword("jianzhiYanyiType");
		infoYanyiType.setSvalue(pYanyiType.getParamName());
		infoYanyiType.setIvalue(this.jianzhiYanyiType);
		infoExpands.add(infoYanyiType);
		//zhaopinnum
		InfoExpand infoZhaopinnum = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "zhaopinnum");
		infoZhaopinnum.setKeyword("zhaopinnum");
		if(this.zhaopinnum == 0){
			infoZhaopinnum.setSvalue("若干");
		}else{
			infoZhaopinnum.setSvalue(String.valueOf(this.zhaopinnum));
		}
		infoZhaopinnum.setIvalue(this.zhaopinnum);
		infoExpands.add(infoZhaopinnum);
		//edugrade
		InfoExpand infoEdugrade = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "edugrade");
		infoEdugrade.setKeyword("edugrade");
		if(this.edugrade == 0){
			infoEdugrade.setSvalue("不限");
			infoEdugrade.setIvalue(0);
		}else{
			Parameter pEdugrade = this.getParameterService().findParameterById(this.edugrade);
			infoEdugrade.setSvalue(pEdugrade.getParamName());
			infoEdugrade.setIvalue(this.edugrade);
		}
		infoExpands.add(infoEdugrade);	
		//workyears
		InfoExpand infoWorkyears = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "workyears");
		infoWorkyears.setKeyword("workyears");
		if(this.workyears == 0){
			infoWorkyears.setSvalue("不限");
			infoWorkyears.setIvalue(0);
		}else{
			Parameter pWorkyears = this.getParameterService().findParameterById(this.workyears);
			infoWorkyears.setSvalue(pWorkyears.getParamName());
			infoEdugrade.setIvalue(this.workyears);
		}
		infoExpands.add(infoWorkyears);	
		//minPrice
		InfoExpand infoMinPrice = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "minPrice");
		infoMinPrice.setKeyword("minPrice");
		infoMinPrice.setSvalue(this.minPrice);
		if(StringUtils.isBlank(this.minPrice)){
			infoMinPrice.setIvalue(0);
		}else{
			infoMinPrice.setIvalue((int)(Float.parseFloat(minPrice)*10));
		}
		infoExpands.add(infoMinPrice);
		//maxPrice
		InfoExpand infoMaxPrice = this.getInfoService().findInfoExpandByInfoIdKeyword(this.id, "maxPrice");
		infoMaxPrice.setKeyword("maxPrice");
		infoMaxPrice.setSvalue(this.maxPrice);
		if(StringUtils.isBlank(this.maxPrice)){
			infoMaxPrice.setIvalue(0);
		}else{
			infoMaxPrice.setIvalue((int)(Float.parseFloat(maxPrice)*10));
		}
		infoExpands.add(infoMaxPrice);

		info = this.getInfoService().updateInfo(info, infoExpands);
		return "doupdate";
	}







}
